home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / FLEX-TC_ / MACUTILS.C < prev    next >
Text File  |  1990-01-03  |  421b  |  26 lines

  1. #ifdef THINK_C
  2. #include <MemoryMgr.h>
  3. #include <ResourceMgr.h>
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6.  
  7. /**
  8.  **        Load a static table from the current resource file
  9.  **/
  10.  
  11. short int *load_table (int id)
  12. {
  13.     Handle h;
  14.     
  15.     if ((h = GetResource ('YYst', id)) == NULL) {
  16.         fputs ("error loading static table resource", stderr);
  17.         putc ('\n', stderr);
  18.         exit (1);
  19.         }
  20.     MoveHHi (h);
  21.     HLock (h);
  22.     return (short int *) *h;
  23.     }
  24. #endif
  25.  
  26.